﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SSFGLExport.aspx.cs" Inherits="SSFGL_SSFGLExport" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title>实收费打印</title>
  <script src="../js/Lodop6.010/LodopFuncs.js" type="text/javascript"></script>
  <object id="LODOP" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width="0"
    height="0">
    <embed id="LODOP_EM" type="application/x-print-lodop" width="0" height="0"></embed>
  </object>
  <%-- <script src="../js/lodop4.0/CheckActivX.js" type="text/javascript"></script>
  <object id="LODOP" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width="0"
    height="0">
  </object>--%>
</head>
<body>
  <form id="form1" runat="server">
  <table width="730" align="center">
    <tr>
      <td colspan="6" style="font-size: 18px; text-align: center;">
        中国石化胜利油田天然气销售有限公司收据
      </td>
    </tr>
  </table>
  <table width="730" align="center" style="font-size: 12px;">
    <tr>
      <td width="10%">
        NO.
      </td>
      <td width="35%">
        <asp:Label ID="lbBH" runat="server" Text="Label"></asp:Label>
      </td>
      <td width="15%">
        日&nbsp;期：
      </td>
      <td width="30%">
        <asp:Label ID="lbCPRQ" runat="server" Text="Label"></asp:Label>
      </td>
    </tr>
  </table>
  <table width="730" border="1" cellspacing="0" style="font-size: 12px; text-align: center;"
    align="center">
    <tr>
      <td width="60px">
        姓&nbsp;名
      </td>
      <td width="130px" colspan="2">
        <asp:Label ID="lbKHMC" runat="server" Text="Label"></asp:Label>
      </td>
      <td width="60px">
        卡&nbsp;号
      </td>
      <td width="120px" colspan="2">
        <asp:Label ID="lbKH" runat="server" Text="Label"></asp:Label>
      </td>
    </tr>
    <tr>
      <td>
        用气量
      </td>
      <td>
        <asp:Label ID="lbYQL" runat="server" Text="Label"></asp:Label>
      </td>
      <td>
        单价
      </td>
      <td>
        <asp:Label ID="lbDJ" runat="server" Text="Label"></asp:Label>
      </td>
      <td>
        保险费
      </td>
      <td>
        <asp:Label ID="lbBXF" runat="server" Text="Label"></asp:Label>
      </td>
    </tr>
    <tr>
      <td>
        金额(元)
      </td>
      <td>
        <asp:Label ID="lbJE" runat="server" Text="Label"></asp:Label>
      </td>
      <td>
        清欠金额
      </td>
      <td>
        <asp:Label ID="lbQQJE" runat="server" Text="Label"></asp:Label>
      </td>
      <td>
        更新费
      </td>
      <td>
        <asp:Label ID="lbGXF" runat="server" Text="Label"></asp:Label>
      </td>
    </tr>
    <tr>
      <td>
        现金(元)
      </td>
      <td colspan="2">
        <asp:Label ID="lbXJ" runat="server" Text="Label"></asp:Label>
      </td>
      <td colspan="2">
        代金券(元)
      </td>
      <td>
        <asp:Label ID="lbDJQ" runat="server" Text="Label"></asp:Label>
      </td>
    </tr>
    <tr>
      <td>
        家庭地址
      </td>
      <td colspan="3">
        <asp:Label ID="lbJTDZ" runat="server" Text="Label"></asp:Label>
      </td>
      <td>
        补气量
      </td>
      <td>
        <asp:Label ID="lbBQL" runat="server" Text="Label"></asp:Label>
      </td>
    </tr>
    <tr>
      <td>
        总计
      </td>
      <td colspan="5">
        <asp:Label ID="lbZJ" runat="server" Text="Label"></asp:Label>
      </td>
    </tr>
    <tr>
      <td>
        用户签名
      </td>
      <td colspan="5">
        <asp:Label ID="lbYHQM" runat="server" Text=""></asp:Label>
      </td>
    </tr>
  </table>
  <table width="730" align="center" style="font-size: 12px;">
    <tr>
      <td width="40%">
        售气站：营业厅1
      </td>
      <td width="30%">
        <asp:Label ID="lbCZY" runat="server" Text="Label"></asp:Label>
      </td>
      <td width="30%">
        <asp:Label ID="lbZDR" runat="server" Text="Label"></asp:Label>
      </td>
    </tr>
  </table>
  <%-- <%if (Convert.ToDouble(JFSJ.GetBCJY(CommonUse.GetID("id"))) > 0)
    { %>--%>
  <asp:Panel ID="Panel1" runat="server" Visible="false">
    <table width="730" border="1" cellspacing="0" align="center" style="font-size: 12px;">
      <tr>
        <td colspan="5" align="center">
          收费明细
        </td>
      </tr>
      <tr>
        <td>
          用气性质
        </td>
        <td>
          用气量
        </td>
        <td>
          单价
        </td>
        <td>
          基金
        </td>
        <td>
          金额
        </td>
      </tr>
      <%
        System.Data.DataSet ds = JFSJ.GetJFMX(CommonUse.GetID());
        if (ds != null)
        {
          for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
          { %>
      <tr height="20" bgcolor="#FFFFFF">
        <td>
          <%=ds.Tables[0].Rows[i]["yqxz"].ToString() + "&nbsp"%>
        </td>
        <td>
          <%=string.Format("{0:n}", Convert.ToDecimal(ds.Tables[0].Rows[i]["yql"].ToString())) + "&nbsp"%>
        </td>
        <td>
          <%=ds.Tables[0].Rows[i]["jf_dj"].ToString() + "&nbsp"%>
        </td>
        <td>
          <%=ds.Tables[0].Rows[i]["jf_jj"].ToString() + "&nbsp"%>
        </td>
        <td>
          <%=string.Format("{0:n}", Convert.ToDecimal(ds.Tables[0].Rows[i]["je"].ToString())) + "&nbsp"%>
        </td>
      </tr>
      <%}
        }%>
    </table>
    <%--<%} %>--%>
  </asp:Panel>
  </form>
  <div style="text-align: center">
    <input type="button" value="打印预览" onclick="prn1_preview()">
    <input type="button" value="选择打印机" onclick="prn1_printA()">
    <input type="button" value="直接打印" onclick="prn1_print()">
    <script language="javascript" type="text/javascript">
      var LODOP; //声明为全局变量 
      function prn1_preview() {
        CreateOneFormPage();
        LODOP.PREVIEW();
      };
      function prn1_print() {
        CreateOneFormPage();
        LODOP.PRINT();
      };
      function prn1_printA() {
        CreateOneFormPage();
        LODOP.PRINTA();
      };
      function CreateOneFormPage() {
        LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM'));
        LODOP.PRINT_INIT("打印插件功能演示_Lodop功能_表单一");
        //LODOP.ADD_PRINT_TEXT(50, 231, 260, 39, "打印页面部分内容");
        LODOP.SET_PRINT_PAGESIZE(1, 2100, 880, "");

        LODOP.SET_PRINT_TEXT_STYLE(1, "宋体", 12, 1, 0, 0, 1);
        LODOP.ADD_PRINT_HTM(3, 10, 730, 600, document.getElementById("form1").innerHTML);
      };	
    </script>
  </div>
  <div align="center">
    如不能打印请下载右侧链接,安装后刷新页面<a href="../js/Lodop6.010/install_lodop.exe">请下载</a></div>
</body>
</html>
